﻿CREATE PROCEDURE [dbo].[ETL_SP_GetVDtTable]
	@DtTableId uniqueidentifier
AS
		SELECT 
			DT.*,
			DS.Name as MappedDataSource,
			DS.Id as MappedDataSourceId,
			DS.DtSerId as MappedDataServiceId
		FROM ETL_DtTable as DT
			LEFT JOIN ETL_DtSourceMapping AS DSM on DSM.DtTableId = DT.Id
			LEFT JOIN ETL_DtSource AS DS on DS.Id = DSM.DtSourceId
		WHERE DT.Id = @DtTableId
RETURN 0
